<div class="box">
	<div class="body">
		<div class="panes">
			<form method="post" action="<{$APPLICATION_URL}>/Admin/Withdraw/index" name = "frmForm">
				<table cellpadding="0" cellspacing="0" border="0" class="grid_table wf">
					<thead>
						<tr>
							<th>
					        	<div>
									<input name="checkAll" id = "checkAll" onclick="checkAllList(this);" type="checkbox" >
								</div>
					        </th>
							<th>ID</th>
							<th>UserID</th>
							<th>Username</th>
							<!-- <th>Name</th> -->
							<th>Paypal Email</th>
							<th>Payment Method</th>
							<th>Amount Received</th>
							<th>Created Date</th>
							<th>Status</th>
						</tr>
					</thead>
					<tbody>
						<{assign var = i value = 0}>
						<{foreach name=outer item=userWithdrawEntity from=$arrUserWithdrawEntity}>
						<tr class="gradeX">
							<td>
								<input name="checkItem<{$i}>" id="checkItem<{$i}>" value="<{$userWithdrawEntity->id}>" type="checkbox">
							</td>
							<td><{$userWithdrawEntity->id}></td>
							<td><{$userWithdrawEntity->userId}></td>
							<td><{$userWithdrawEntity->usersEntity->username}></td>
							<!-- <td><{$userWithdrawEntity->usersEntity->firstName}> <{$userWithdrawEntity->usersEntity->lastName}></td> -->
							<td><{$userWithdrawEntity->paypalEmail}></td>
							<td><{$userWithdrawEntity->paymentMethod}></td>
							<td><{$userWithdrawEntity->amountReceived}> <{$userWithdrawEntity->currency}></td>
							<td><{$userWithdrawEntity->createdDate}></td>
							<td class="center">
								<div><{$userWithdrawEntity->getStatusName()}></div>
							</td>
						</tr>
						<{assign var = i value = $i+1}>
						<{/foreach}>
						<tr>
							<td colspan="11">
								<input type="hidden" name="iCount" id="iCount" value="<{$i}>" />
								<input type="hidden" name="idValue" id="idValue" value="" />
								<input type="hidden" id="actionForm" name="actionForm" value="">
								<input type="hidden" id="actionKey" name="actionKey" value="<{$actionKey}>">
								<div style="float: right;">
									<input name="pending" value=" Pending" onclick="javascript: var theform = document.frmForm; theform.action = '<{$APPLICATION_URL}>/Admin/Withdraw/pending'; theform.submit(); return true;" type="button">
									<input name="processing" value=" Processing" onclick="javascript: var theform = document.frmForm; theform.action = '<{$APPLICATION_URL}>/Admin/Withdraw/processing'; theform.submit(); return true;" type="button">
									<input name="completed" value=" Completed " onclick="javascript: var theform = document.frmForm; theform.action = '<{$APPLICATION_URL}>/Admin/Withdraw/completed'; theform.submit(); return true;" type="button">
									<input name="rejected" value=" Rejected" onclick="javascript: var theform = document.frmForm; theform.action = '<{$APPLICATION_URL}>/Admin/Withdraw/rejected'; theform.submit(); return true;" type="button">
								</div>
							</td>
						</tr>
					</tbody>
				</table>
				
			</form>
		</div>
	</div>
</div>
<script type="text/javascript">
    function checkAllList(){
       var theform = document.frmForm;
       var n = parseInt(theform.iCount.value);

       for(i=0; i<n; i++){
           if(theform.checkAll.checked){
           	  	document.getElementById("checkItem"+i).checked=true;
           }else{
           		document.getElementById("checkItem"+i).checked=false;
           }
       }
       return true;
    }

    function search(){
    	var theform = document.frmForm;
    	theform.submit();
    	return true;
    }
</script>